Geometry and reality in Geometrica05

Bruno Autin

bautin1@club-internet.fr

Geometry, the missing chapter of Mathematica

In Mathematica, geometry is not treated on the same footing as other branches of mathematics such as algebra or analysis. Besides the Graphics or Graphics3D built-in functions, it is scattered in several packages: DiscreteMath`ComputationalGeometry`, Geometry`, Graphics` or NumericalMath`SplineFit`. Moreover, some basic concepts are missing: representation of objects which extend to infinity, embedding 2D objects into 3D space or massive production of diagrams using listable functions. Cartesian curves in 2D and cartesian surfaces in 3D are considered as boundaries of space and will take full advantage of the new functionalities, such as RegionPlot, planned  for the version 6 of Mathematica.

Realm of Geometrica

Geometrica is designed to be an encyclopaedia of geometry. Because it uses the symbolic engine of Mathematica, the drawing is exact, many theorems are integrated and tests of validity can be performed. Most functions are listable so that intensive computations can be performed with concise statements. Legending a figure is an example of that feature. 
The euclidean geometry is thoroughly covered for two and three dimensions. Whenever possible, a unified design is adopted for 2D and 3D so that plane objects can easily be embedded into space. The geometric objects are systematically represented by their cartesian and parametric forms and defined by a variety of euclidean functions. Basic objects such as lines, planes, conics and quadrics are manipulated using their cartesian equation. In order to simplify these manipulations, definitions by default are available so that the shape of an object can be visualized without using all the coefficients of the equation. For instance, HyperbolicParaboloid[] returns a quadric which can be immediately represented using the function Draw3D. 
Differential geometry is partially treated through the parametric form of an object. Distances,areas and volumes are evaluated. Parallel and paraxial (or offset) curves and surfaces are easily generated.

Ideal geometry

Geometry as it is traditionally taught is made of ideal objects. Points have no dimension. Curves, surfaces, polygons and polyhedra are infinitely thin.

Geometry in high schools

Children were recently tested to examine how receptive they could be to Geometrica. It is explained how they reacted to the construction of the bisectors of the sides of a triangle.

The Geometrica package is loaded first like any standard Mathematica package.

<< Geometrica`Geometrica05`

One defines an arbitrary triangle and draw it with labeled vertices.

t = Triangle[]
Draw[Paint[t, Red], Legend["ABC", t]];

The triangle is considered as a generalized segment defined by its three vertices, the first vertex is repeated at the end to distinguish the triangle from an open polygonal line. The vertices are cartesian points (note the capital C) defined by their coordinates. The bisectors of the sides can be defined in a single statement thanks to the listability of the symbol Bisector. The listability is a general property of Geometrica functions which permits massive production of elements yet keeping a concise syntax.

b = Simplify@Bisector[t]
Draw[Paint[t, Red], Legend["ABC", t], DrawRange[-1, 1], Blue, 
        b];

The bisectors are three lines whose representation has to be limited. The default option can be improved by limiting the interval of variation of the parameter which describes the line in Draw. The directive DrawRange performs this task. It is observed that the bisectors pass through the same point. 
To investigate this property, the circumcenter of the triangle is determined and it is verified that it belongs to the three bisectors.

m = Simplify@Circumcenter[t]
OfQ[m, b]

The figure is finally wrapped in the circumcircle of the triangle.

c = Circumcircle[t]
Draw[Paint[t, Red], Legend["ABC", t], DrawRange[-1, 1], Blue, 
        b, Green, c];

Geometry at college level

More advanced is the treatment of quadrics both in their cartesian and parametric forms. The surface chosen is the hyperbolic paraboloid. Intersections with planes, tangent cone, volume limited by the surface and a plane perpendicular to the axis normal to the saddle are discussed.

hp =  HyperbolicParaboloid[]
Draw3D@Paint[hp];

The intersections of the hyperbolic paraboloid with planes perpendicular to the axis show the transition at the saddle. The orientation of the hyperbolae changes when the plane is tangent to the surface and, at the transition, the hyperbola is degenerated into two lines.

p = CPlane[0, 0, 1, 4 {-1, 0, 1}];
x = Intersections[hp, p]
Draw3D[Paint[hp], Thickness[ .01], Red, x];

The cone of vertex (4,0,2) tangent to the hyperbolic paraboloid is simply given as one of the definitions of a cone.

co = Cone[CPoint[4, 0, 2], hp]
Draw3D[Blue, hp, Red, co];

The volume included between the two extreme planes perpendicular to the axis and the hyperbolic paraboloid is given by the function Volume.

Volume[hp]

Morphogenesis and CAD applications

Coming to real world and applications, it becomes needed to go beyond the shapes of ideal geometry and to deal with objects that have a finite thickness. Nature is a wonderful repository of shapes. Many mathematical techniques can be used to create forms, such as evolutionary algorithms or cellular automata. Geometrica produces shapes by varying classical surfaces. The new surface is generated by the extremity of the normal to the initial surface, the length of the normal being chosen by the user. Whether the length of the normal is fixed or variable, a parallel or paraxial (or offset) surface is generated. It will be shown how an elliptic cylinder can be transformed into a paraxial surface. The cylinder has a parametric representation whose first variable, u, describes the directrix of the cylinder and the second one, v, characterizes the position of a point along a generator. The function Sin[u]v deforms the cylinder in proportion to the height of the cylinder. The base does not change but the top is significantly affected.

ec = EllipticCylinder[]
ecp = Paraxial[ec, Sin[#1] #2 &]

Draw3D[Blue, ec, Paint[ecp]];

Most CAD programs use Bezier or Bezier related approximations to represent surfaces. The comparison between an exact surface such as the previous one and its Bezier fit is shown in the next figure.

m = Table[{u, v}, {u, 0, 2  Pi,  .1}, {v, 0, 1,  .1}];
pts = m /. {xx_, yy_} -> Pointer[ecp, xx, yy];
ecpb = Bezier[pts]; 
Draw3D[Blue, ecp, Red, ecpb];

Conclusion

Geometrica can treat both ideal and real geometry. It will keep evolving along these two lines with an emphasis on architectural applications.